<%@page contentType="text/html;charset=UTF-8"%>
<%@ page import="whf.framework.web.Constants"%>

<%@taglib uri="/WEB-INF/tlds/framework.tld" prefix="framework"%>
<%@taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<jsp:include page="/common/inc/select.jsp" />
</head>
<body>
<framework:msg />
<html:form action='<%=  (String)request.getAttribute(Constants.STRUTS_PATH) %>' method="post">
<html:hidden property="webMethod" />
<html:hidden property="id" />

<table align="center" width="95%">
<tr><td>
选择用户组：
</td></tr>
<tr><td>
<div scroll="auto" height="350">
<framework:selections selectionName="group" source="groups" valueProperty="id" textProperty="name" 
	multiSelect="true" selectedValues="<%= (String)request.getAttribute("selectedValues") %>" rowCount="12" />
</div>
</td></tr>
<tr><td>
<input type="submit" value="确定" >
<input type="reset" value="重置" >
<input type="button" value="全选" onclick="selectAll()">
<input type="button" value="全不选" onclick="deselectAll()" >
<input type="button" value="取消" onclick="window.close();">
</td></tr>
</table>
</html:form>
</body>
<script>
function selectAll(){
	var eles = document.getElementsByName("group");
	for(i=0; i< eles.length; i++){
		eles[i].checked=true;
	}
}
function deselectAll(){
	var eles = document.getElementsByName("group");
	for(i=0; i< eles.length; i++){
		eles[i].checked=false;
	}
}
</script>
</html>